import React, { Component } from 'react'
import axios from 'axios'
export default class Arts extends Component {
  constructor(){
    super()
    this.state={
        list:[]
    }
  }
  componentDidMount(){
    axios.get('https://www.fastmock.site/mock/a7a2b0e3b0493fcee4342926cae58025/tickets/getAllArts').then((response)=>{
       console.log('response',response.data.goods);
       this.setState({list:response.data.goods})
    })
  }
  render() {
    const {list}=this.state
    return (
      <div>
        {
            list.length>0&&list.map(item=><div key={item.id}>
                <img src={item.img_src} alt="" />
            </div>)
        }
      </div>
    )
  }
}
